﻿public class PlayerCrouchIdle : PlayerBaseState {
	public PlayerCrouchIdle(PlayerController controller, PlayerStateEnum stateName, State<PlayerStateEnum> superFSM, StateFactory<PlayerStateEnum> factory) : base(controller, stateName, superFSM, factory) {
		AddConditionToSelf(() => controller.IsTouchCeiling || controller.DownInput);

		AddNewTransition(PlayerStateEnum.Idle, () => !controller.DownInput && !controller.IsTouchCeiling);
	}

	public override void Enter() {
		_controller.PlayAnim(PlayerStateEnum.CrouchIdle);
		_controller.UpColl.enabled = false;
	}

	public override void Exit() {
		_controller.UpColl.enabled = true;
	}
}